#ifndef _CAMERA_H_
#define _CAMERA_H_

#include "maze.h"
#include "point.h"
#include <math.h>
#include <QGLWidget>

const float kPi = 3.1415926535f;

enum View { SCENE_VIEW, PLAYER_VIEW };

class Camera
{
  Point tpv_, fpv_, pan_;
  Direction fpv_dir_;
  float radius_, aspect_ratio_, zoom_, phi_, theta_;
  View view_;

public:
    Camera();
    bool IsFpv();
    void SwitchCamera();
    void SetSceneCamera();
    void SetAspectRatio(float); // Viewport aspect ratio
    void SetContent(Point center, float radius); // Center and radius of the bounding sphere
    void SetPlayer(Point position, Direction dir);
    void Zoom(float);
    void Rotate(float, float);
    void Pan(float, float);
    void Reset();
    Point GetVrp();
    Point GetPan();
    float GetDistance(); // Distance bewteen VRP and OBS
    float GetNear();
    float GetFar();
    float GetTheta();
    float GetPhi();
    float GetFOV();
    float GetAspectRatio();
};

#endif // CAMERA_H
